import {ObjectDto, ObjectDtoInterface} from "../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../services/sqliteDB/object.dto";
import {SyncStatus} from "../sync-status";
import {WorkOrderStatus} from "../transform/work-order";

export class UserDto extends ObjectDto implements ObjectDtoInterface {
    public id: string = null;
    // public number: string = null; // 编号
    public account: string = null;
    public fullName: string = null;
    public telephone: string = null;
    public mobile: string = null;
    public address: string = null;
    public areaId: string = null; // 区域号
    public districtId: string = null; // 台号
    public propertyNo: string = null; // 资产编号
    public totalUnPaidAmount: number = null; // 欠费总额
    public theToppestChargeLevel: number = null; // 欠费最高的催费级别
    public chargeDetailIds: string = null;
    public theToppestMonth: number = null; // 欠费最大的月份
    public noticeUploadTime: number = null;
    public maxChargeOperationStatus: WorkOrderStatus = null;
    public syncStatus: SyncStatus = SyncStatus.None;

    constructor() {
        super();
    }

    table() {
        return {
            tableName: "Users",
            tableConstructor: {
                // id: `${TableColumnType.text}`,
                id: `${TableColumnType.text} ${TableColumnType.unique}`,
                // number: `${TableColumnType.text} ${TableColumnType.unique}`,
                account: TableColumnType.text,
                fullName: TableColumnType.text,
                telephone: TableColumnType.text,
                mobile: TableColumnType.text,
                address: TableColumnType.text,
                areaId: TableColumnType.text,
                districtId: TableColumnType.text,
                propertyNo: TableColumnType.text,
                totalUnPaidAmount: TableColumnType.int,
                theToppestChargeLevel: TableColumnType.int,
                chargeDetailIds: TableColumnType.text,
                theToppestMonth: TableColumnType.int,
                maxChargeOperationStatus: TableColumnType.int,
                noticeUploadTime: TableColumnType.int,
                syncStatus: TableColumnType.int,
            }
        };
    }

}





